<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>袁晴龙的后台管理系统</title>
</head>

<body>

  <div id="app"></div>

</body>
<script src="js/vue.js"></script>
<script src="js/axios-0.18.0.js"></script>
<script src="./js/axiosUtil.js"></script>

<script>
  new Vue({
    el: "#app",
    data() {
      return {
      }
    },
    methods: {
      checkLogin() {
        axiosGet('/checkLogin').then(res => {
          if (res.data.data) {
            location.href = 'home.html'
          } else {
            location.href = 'login.html'
          }
        })
      }
    },
    mounted() {
      this.checkLogin()
    }
  })
</script>

</html>
